package com.prelearning.at_springboot.service.impl;

import com.prelearning.at_springboot.entity.ChatInfo;
import com.prelearning.at_springboot.mapper.ChatInfoMapper;
import com.prelearning.at_springboot.service.IChatInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author cgr
 * @since 2022-04-28
 */
@Service
public class ChatInfoServiceImpl extends ServiceImpl<ChatInfoMapper, ChatInfo> implements IChatInfoService {

    @Resource
    private ChatInfoMapper chatInfoMapper;

    //根据用户id获取所管理的群组信息
    @Override
    public List<ChatInfo> getByOwner(String owner_id) {
        return chatInfoMapper.getByOwnerId(owner_id);
    }

}
